/**
 * @author <a href = "mailto:AngelElectrico@PsiqueWare.com">Angel El&eacute;ctrico</a>
 * Creaci&oacute;n: 14-nov-2005 - 10:42:02
 * Cambios :
 *  Autor  |  Cambios
 *
 */

package com.psiqueware.alheli.dao;

/**
 * Excepci&oacute;n que sucede si hay un error en la conexi&oacute;n
 * <br/>Paquete Original: com.psiqueware.basico.dao
 * <br/>Nombre  Original: ConnectionException
 * <br/><a href="ConnectionException.java.html"><i>Ver C&oacute;digo Fuente</i> </a>
 *
 * @author <a href="mailto:AngelElectrico@PsiqueWare.com">Angel El&eacute;ctrico</a>
 * @version Revision: 1.1 14-nov-2005 10:42:02
 * @noinspection ClassWithoutNoArgConstructor, ClassWithoutLogger, ClassTooDeepInInheritanceTree, DeserializableClassInSecureContext, SerializableClassInSecureContext
 */

public final class ConnectionException extends DAOException
{

    /**
     * @noinspection FieldNameHidesFieldInSuperclass
     */
    public static final String STANDARD_MSG = "Hubo un error en la conexi&oacute;n.";

    /**
     * Constructor for ConnectionException.
     */
    public ConnectionException()
    {
        super(STANDARD_MSG);
    }

    /**
     * Constructor for ConnectionException.
     *
     * @param message que se pretende contenga la excepci&oacute;n.
     */
    public ConnectionException(String message)
    {
        super(message);
    }

    /**
     * Constructor for ConnectionException.
     *
     * @param message que se pretende contenga la excepci&oacute;n.
     * @param cause   excepci&oacute;n que origin&oacute; esta.
     */
    public ConnectionException(String message, Throwable cause)
    {
        super(message, cause);

    }

    /**
     * Constructor for ConnectionException.
     *
     * @param cause excepci&oacute;n que origin&oacute; esta.
     */
    public ConnectionException(Throwable cause)
    {
        super(STANDARD_MSG, cause);
    }

    /**
     * Convierte este {@link ConnectionException} a su representaci&oacute;n textual.
     *
     * @noinspection DuplicateStringLiteralInspection
     */
    public String toString()
    {

        StringBuilder sb = new StringBuilder();
        sb.append("<Instance Class = '").append(this.getClass()).append("'>");
        sb.append("<msg>").append(super.getLocalizedMessage()).append("</msg>");
        sb.append("<super>").append(super.toString()).append("</super>");
        sb.append("</Instance>");
        return sb.toString();
    }

}

